package com.qfedu.smart_community.controller;

import com.qfedu.smart_community.entity.House;
import com.qfedu.smart_community.service.HouseService;
import com.qfedu.smart_community.vo.AjaxVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @version v1.0
 * @Date 2023/10/23 21:26
 * @Author DARKER
 * @Email 1402216045@qq.com
 */
@Controller
@RequestMapping("/house")
public class HouseController {
    @Autowired
    private HouseService service;

    @RequestMapping("/list.do")
    @ResponseBody
    public AjaxVO findList(){
        List<House> list = service.findAll();
        return AjaxVO.create().setCode(0).setMsg("成功!").setData(list);
    }



}
